package com.hctforgreen.greenservice.utils;

import android.util.Log;

/**
 * 集中管理应用中的日志打印，避免日志打印异常
 * Created by 390697 on 2016/11/5.
 */
public class LogUtil {

    //调试时为true 正式打包时为false
    public static boolean isDebug = true;


    public static void v(String tag,String msg){
        if (isDebug) {
            Log.v(tag, msg);
        }
    }

    public static void i(String tag,String msg){
        if (isDebug) {
            Log.i(tag, msg);
        }
    }

    public static void e(String tag,String msg){
        if (isDebug) {
            Log.e(tag, msg);
        }
    }

    public static void d(String tag,String msg){
        if (isDebug) {
            Log.d(tag, msg);
        }
    }

    public static void e(String tag, String msg, Throwable throwable) {
        if(isDebug) {
            Log.e(tag, msg, throwable);
        }
    }
    public static void w(String tag, String msg) {
        if(isDebug) {
            Log.w(tag, msg);
        }
    }
}
